xl: don't emit misleading daemon pid message
authorMatthew Daley <mattjd@gmail.com>
Sun, 27 Oct 2013 06:49:14 +0000 (19:49 +1300)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 28 Oct 2013 15:54:45 +0000 (15:54 +0000)
commit2cd1f418feb215c379b6737576b53bba6f70c1a6
treeff42d4751c0a20f7e201921190a876d5576d0899
parent35e874b1d5d56dd2098313364b879c637fa56844
xl: don't emit misleading daemon pid message

After creating a domain, xl forks off a process to handle domain events
(shutdown, disk eject, ...). It prints out the pid of the process
created by the fork to stdout. However, the newly forked process soon
after calls daemon(), which itself forks once more (and exit()s the
original process). This means that the pid printed out is not the pid of
the actual process which remains in the background after all is said and
done, instead it is the pid of the transient process that exists between
xl's fork() and the fork'd process's daemon() call.

We could resolve this by printing the correct pid, ie. by open-coding
daemon() (we already do most of the heavy lifting it does ourselves by
fiddling with the standard fds). However, since no-one seems to be
complaining about the misleading message to begin with, and since it
seems like a pointless message anyway, just remove it outright instead.

Signed-off-by: Matthew Daley <mattjd@gmail.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/xl_cmdimpl.c